package com.beiming.libra.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.beiming.libra.base.MyMapper;
import com.beiming.libra.domain.AuthRoleRelation;
import com.beiming.libra.domain.MenuInfo;

@Mapper
public interface AuthRoleRelationMapper extends MyMapper<AuthRoleRelation> {
  /**
   * 根据角色id 删除角色权限关系
   */
  int deleteByRoleId(@Param("roleId") String roleId);

  /**
   * 根据角色id以及菜单menuId 查询已经存在的关系
   */
  List<AuthRoleRelation> selectByRoleAndMeunId(@Param("roleId") String roleId,
      @Param("menuIdList") String[] menuIdList);

  /**
   * 获取权限信息
   * 
   * @param userId
   */
  List<MenuInfo> getAuthInfoByUserIdMapper(@Param("userId") String userId,
      @Param("platformEnumCode") String platformEnumCode);
}
